import { HttpStatus } from './HttpStatus';

export class TableDataInfo<T> {
  total: number;
  rows: T[];
  code: number;
  msg: string;
  constructor(rows: T[], total: number, code?: number, msg?: string) {
    this.total = total;
    this.rows = rows;
    this.code = code || HttpStatus.SUCCESS;
    this.msg = msg || '查询成功';
  }
}
